import 'package:json_annotation/json_annotation.dart';

part 'userInfo.g.dart';

@JsonSerializable()
class UserInfo {

  int id;
  String name;
  int deptId;

  UserInfo({this.id,this.name,this.deptId});


  UserInfo.empty();

  //不同的类使用不同的mixin即可
  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);

  Map<String, dynamic> toJson() => _$UserInfoToJson(this);
}
